
import 'package:flutter/material.dart';

class FirstPage extends StatefulWidget {
  

  @override
  State<StatefulWidget> createState(){
    return FirstPageState();
  }
}

class FirstPageState extends State<FirstPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("第一个页面"),
      ),
      body: Center(
        child: FlatButton(
          onPressed: (){
            // 跳转第二页面 只需要调用Navigator 的push方法
            Navigator.of(context).pushNamed("/scend");

          },
            child: Text("点击跳转第二页面")),
      ),
    );
  }
}

